/*
 * @Author: chenzechao
 * @Date: 2024-02-06 15:46:07
 * @LastEditors: chenzechao
 * @LastEditTime: 2024-02-06 16:07:35
 * @FilePath: \accesscontrolui\src\assets\common\js\utils\dataInfo.js
 * @Description: 
 */
export const getMonthInfo=(timeData)=> {
    let year=timeData.getFullYear()
    let month=timeData.getMonth()+1
    let firstDay = new Date(year, month - 1, 1);
    let nextMonthFirstDay = new Date(year, month, 1);
    let daysInMonth = Math.floor((nextMonthFirstDay - firstDay) / (24 * 60 * 60 * 1000));
    let firstDayOfWeek = firstDay.getDay();

    return {
      daysInMonth: daysInMonth,
      firstDayOfWeek: firstDayOfWeek
    };
  }